package com.dabaozhan.modules.wx_app.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.dabaozhan.modules.wx_app.entity.SiteOutRecordEntity;

@Mapper
public interface SiteOutRecordMapper{
	
	public int addOutRecord(SiteOutRecordEntity entity);
	
	public int updateArriveRecord(SiteOutRecordEntity entity);
	
	public int updateSettleStatus(SiteOutRecordEntity entity);
	
	public long getOutRecordCountForPage(@Param("userId")String userId,@Param("placeStatus")Integer placeStatus);
	
	public List<SiteOutRecordEntity> getOutRecord(@Param("userId")String userId,@Param("placeStatus")Integer placeStatus,@Param("beginIndex")Integer beginIndex,@Param("endIndex")Integer endIndex);
	
	
	public long getBalanceBillCountForPage(@Param("userId")String userId,@Param("settleStatus")Integer settleStatus,@Param("beginTime")Date beginTime,@Param("endTime")Date endTime);
	
	public List<SiteOutRecordEntity> getBalanceBill(@Param("userId")String userId,@Param("settleStatus")Integer settleStatus,@Param("beginTime")Date beginTime,@Param("endTime")Date endTime,@Param("beginIndex")Integer beginIndex,@Param("endIndex")Integer endIndex);

	public List<SiteOutRecordEntity> getRecordListForStock(@Param("userId")String userId,@Param("categoryId")String categoryId,@Param("time")Date time);

	public SiteOutRecordEntity getRecordByOrderSerial(@Param("orderSerial")String orderSerial);
}
